<?php
require_once '../classes/class.CsDatabaseOpera.php';
require_once '../classes/globalvar.php';

$dbObj = new CsDatabaseOpera ($dbHostName, $dbUserName, $dbPswd,$dbName);


$sql = "SELECT `msg_type`,COUNT(*) AS total FROM `cs_notification` WHERE `usr_id` = '".mysql_real_escape_string($_POST['uid'])."' GROUP BY `usr_id` ,`msg_type`";
$tResultSet = $dbObj -> executeQuery($sql);
if($tResultSet){
	foreach($tResultSet as $val){
		$tempStr .= $val['msg_type'].':'.$val['total'].'|';
	}
	echo substr($tempStr,0,-1);
}